import 'package:json_annotation/json_annotation.dart';

import 'index.dart';

part 'register_v2_response.g.dart';

@JsonSerializable()
class RegisterV2Response extends Object {
  @JsonKey(name: 'resultCode', defaultValue: 0)
  int resultCode;

  @JsonKey(name: 'transactionId', defaultValue: "")
  String transactionId;

  @JsonKey(name: 'clientID', defaultValue: "")
  String clientID;

  @JsonKey(name: 'responseMessage', defaultValue: "")
  String responseMessage;

  @JsonKey(name: 'error', defaultValue: null)
  ErrorResponse? error;

  RegisterV2Response(
    this.resultCode,
    this.transactionId,
    this.clientID,
    this.responseMessage,
    this.error,
  );

  factory RegisterV2Response.fromJson(Map<String, dynamic> srcJson) =>
      _$RegisterV2ResponseFromJson(srcJson);

  Map<String, dynamic> toJson() => _$RegisterV2ResponseToJson(this);
}
